<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            display: flex;
            width: 1000px;
            height: 500px;
            background-color: chartreuse;
            /* space-between --------先两边贴边，再平分剩余空间 */
            justify-content: space-between;
               /* flex布局中，默认是不换行的，如果装不开，会缩小子元素的宽度*/
            /* flex-wrap: nowrap; ------不换行（默认）*/
            /* flex-wrap: wrap;---------换行 */
           flex-wrap: wrap;
        }
        span {
            width: 300px;
            height: 150px;
            background-color: cyan;
           
            margin: 10px;
         
        }
    </style>
</head>
<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
        <span>6</span>
    </div>
</body>
</html>